package com.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dao.UserDao;
import com.domain.Role;
import com.domain.User;

@Service
public class UserService {
	@Autowired
	private UserDao userDao;
	
	public boolean isHasUser(User user){
		boolean flag = false; 
		int numFlag = userDao.checkUser(user);
		if(numFlag>0){
			flag = true;
		}
		return flag;
	}
	public List<Role> getAllRoles(){
		
		return userDao.getAllRoles();
	}
}
